import http from '@/utils/http'

/**
 * 添加课程信息
 */
export const addCourseApi = async(param) => {
  return http.post('/api/course', param)
}

/**
 * 修改课程信息
 */
export const editCourseApi = async(param) => {
  return http.put('/api/course', param)
}

/**
 * 根据id删除课程信息
 */
export const deleteCourseApi = async(param) => {
  return http.delete('/api/course', param)
}

/**
 * 查询课程信息
 */
export const getCourseListApi = async(param) => {
  return http.get('/api/course/list', param)
}

/**
 * 课程分配教师
 */
export const assignSaveApi = async(param) => {
  return http.post('/api/course/assignSave', param)
}
/**
 * 课程解除教师
 */
export const removeTeacherApi = async(param) => {
  return http.post('/api/course/removeTeacher', param)
}

/**
 * 班级树
 */
export const getClassTreeListApi = async() => {
  return http.get('/api/classCourse/getClassTree', null)
}

/**
 *查询全部课程
 */
export const getCoursesListApi = async() => {
  return http.get('/api/classCourse/getCourseList', null)
}

/**
 *查询班级课程
 */
export const getClassCourseApi = async(param) => {
  return http.get('/api/classCourse/getClassCourse', param)
}

/**
 *保存班级分配课程
 */
export const saveAssignClassCourseApi = async(param) => {
  return http.post('/api/classCourse/saveAssignClassCourse', param)
}

/**
 *保存班级分配课程
 */
export const deleteClassCourseApi = async(param) => {
  return http.delete('/api/classCourse', param)
}

